package drumkit;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: Aleksey
 * Date: 02.01.2008
 * Time: 18:07:20
 */
public class Drum {
    public final static Integer DRUM_TYPE_CYMBALS = 1;
    public final static Integer DRUM_TYPE_DRUMS = 2;
    public final static Integer DRUM_TYPE_UNKNOWN = 3;

    private String name;
    private Integer type;
    private ArrayList<PositionedDrum> positions;
    private Integer index;

    public Drum() {
        positions = new ArrayList<PositionedDrum>();
    }

    public Drum(String name, Integer type) {
        this();
        this.name = name;
        this.type = type;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public Integer getType() {
        return type;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPositionCount() {
        return positions.size();
    }

    public void addPosition(PositionedDrum positionedDrum) {
        positions.add(positionedDrum);
    }

    public PositionedDrum getPosition(Integer index) {
        return positions.get(index);
    }
}
